#! /usr/bin/perl -wl
#------------------------------------------------
# Author:    vj
# Created:   Sun Jun  9 12:07:49 IST 2013
# File Name: boolean
# USAGE: 
#       boolean 
# 
# 
#------------------------------------------------
use List::Util qw(first max maxstr min minstr reduce shuffle sum);

sub genXOR {
  my @arr;
  foreach (0 .. (1 << $_[0]) - 1) {
    @arr = split //, sprintf "%0$_[0]b", $_;
    print "@arr ", reduce {no warnings qw(once); $a ^ $b} @arr;
  }
}

my $ipSize = 3;
my $opSize = 1;
my $n = 1 << $ipSize;

print "$ipSize $opSize";
print $n;
&genXOR($ipSize);
